home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 12261 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.7 KB

  1. Path: cypher.3do.com!user
  2. From: tsw@3do.com (Tom Watson)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: BEGINNER -- Borland tcwin 4.5 Tab Input Problem
  5. Date: Fri, 29 Mar 1996 17:05:53 -0800
  6. Organization: The 3DO Corporation
  7. Distribution: world
  8. Message-ID: <tsw-2903961705530001@cypher.3do.com>
  9. References: <4jem3o$8cg_002@nuts.nwu.edu>
  10. NNTP-Posting-Host: cypher.3do.com
  11.  
  12. In article <4jem3o$8cg_002@nuts.nwu.edu>, llong@nwu.edu (Laurie Long) wrote:
  13.  
  14. > Can someone explain why a user-entered tab is not recognized.  I have
  15. included 
  16. >  a "case: '\t'" in my program.  The program doesn't freeze if the tab key is 
  17. > pressed.   The user can go on entering any other character -- white space or 
  18. > otherwise. Also, if I use '\t' in a printf control string, for example, it 
  19. > works just fine.  This seems to be an input problem.
  20.  
  21. Some I/O packages which buffer input convert tabs into a corresponding
  22. number of spaces to the next tab stop.  In others, you may need to have an
  23. "activation character" before you can get any input from the input stream
  24. (usually the <enter> key).  Unfortunately, both of these topics have
  25. NOTHING to do with the C language, but are defined in the implementation. 
  26. The answer you desire is most likely hidden in the manuals that came with
  27. your C programming system.  In addition, the C FAQ list at 
  28.  
  29. "ftp://rtfm.mit.edu/pub/usenet-by-group/comp.lang.c/C-FAQ-list"
  30.  
  31. Which might have the information you desire.  In any event, I would
  32. attempt to print out the character received (possibly to a file) in a hex
  33. type format for each character that you pass thru the switch statement, it
  34. may just give you some clues.
  35.  
  36. Good luck
  37.  
  38. -- 
  39. Tom Watson
  40. tsw@3do.com         (Home: tsw@johana.com)
  41.